<template>
    <div>
      <div class="item" v-for="(item,index) in list " :key="index">
        <div class="item-title">
            <span class="item-icon"></span>
            {{item.title}}
        </div>
        <div v-if="item.children" class="item-children">
           <list :list="item.children">

           </list>
        </div>
      </div>
    </div>
</template>

<script>
    export default {
        name: "list",
        props:{
          list:Array
        }
    }
</script>

<style lang="stylus" scoped>
 .item-title
    line-height:0.6rem
    .item-icon
      position:relative
      left:0.2rem
      top:.15rem
      margin-right:0.2rem
      display:inline-block
      width:0.6rem
      height:0.6rem
      line-height:0.6rem
      background:url("http://s.qunarzz.com/piao/image/touch/sight/detail.png") 0  -0.6rem   no-repeat;
      background-size:.6rem
 .item-children
    padding:0  0.2rem
</style>
